//
// Created by hjie on 23-6-23.
//

#include "config.h"

Config::Config()
{
    m_server_base_config = new ServerBaseConfig;
}

bool Config::LoadConfigFile(const std::string &config_file)
{
    m_server_base_config->m_listen_port = 3347;

    m_server_base_config->m_ssl_listen_port = 2347;
    m_server_base_config->m_key_file  = "/home/hjie/source/uWebSockets/misc/ssl/key.pem";
    m_server_base_config->m_cert_file = "/home/hjie/source/uWebSockets/misc/ssl/cert.pem";

    return true;
}

int Config::GetListenPort()
{
    return m_server_base_config->m_listen_port;
}

int Config::GetSSLListenPort()
{
    return m_server_base_config->m_ssl_listen_port;
}

std::string Config::GetSSLKeyFile()
{
    return m_server_base_config->m_key_file;
}

std::string Config::GetSSLCertFile()
{
    return m_server_base_config->m_cert_file;
}